package com.newlink.building.main.ui

import android.view.View
import com.alibaba.android.arouter.facade.annotation.Route
import com.alibaba.android.arouter.launcher.ARouter
import com.newlink.building.common_base.base.NL_BaseActivity
import com.newlink.building.common_base.constant.Base_RouterPath
import com.newlink.building.main.databinding.ActivitySipAccountBinding

/**
 * @Author: xiaodong (Refactored by Assistant)
 * @Date: 2022/9/1
 * @Description: SIP 账户主界面。作为 SIP 相关功能的导航中心，通过 ARouter 跳转到登录、拨号和监控界面。
 */
@Route(path = Base_RouterPath.PATH_SIP_ACCOUNT)
class Module_Main_SipAccountActivityNL : NL_BaseActivity() {

    // View Binding 实例
    private lateinit var binding: ActivitySipAccountBinding

    /**
     * 绑定布局文件并返回根视图。
     * @return Activity 的根视图。
     */
    override fun attachLayoutRes(): View {
        binding = ActivitySipAccountBinding.inflate(layoutInflater)
        return binding.root
    }

    /**
     * 初始化数据 (当前无特定数据需在此处初始化)。
     */
    override fun initData() {
        // No specific data initialization required at the moment
    }

    /**
     * 初始化视图组件和设置监听器。
     */
    override fun initView() {
        // Set click listeners using View Binding
        binding.login.setOnClickListener {
            ARouter.getInstance().build(Base_RouterPath.PATH_ACCOUNTLOGIN).navigation()
        }

        binding.makecall.setOnClickListener {
            ARouter.getInstance().build(Base_RouterPath.PATH_DIAL).navigation()
        }

        binding.monitor.setOnClickListener {
            // Uncomment and set up RouterPath.PATH_MONITOR_RTSP if this feature is enabled
            // ARouter.getInstance().build(RouterPath.PATH_MONITOR_RTSP).navigation()
            // The original code had the monitor navigation commented out, so it's kept that way.
        }
    }
}